﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.CodeRush.StructuralParser;
using DevExpress.CodeRush.Core;

namespace DX_SourceOutliner
{
    public class NodeProcessor
    {
        private IEnumerable<INodeProcessor> _processors;

        public NodeProcessor(IEnumerable<INodeProcessor> processors)
        {
            _processors = processors;


        }
        public IEnumerable<TreeNode> Process(IEnumerable<TreeNode> nodes)
        {
            foreach (INodeProcessor _processor in _processors)
            {
                NodeIterator.Apply(nodes, _processor.Process);
            }

            return nodes;
        }
    }
}